var jqInputId;
TestCase("CommaAsSeparatorTestCase", {
	setUp: function() {
		setUpSeparatorTestCase({separator: ','});
	},
	testNumpadDecSeparatorShouldBeComma : function() {
		assertCommaPresent(nf$(jqInputId));
	}
});
TestCase("COMMAAsSeparatorTestCase", {
	setUp: function() {
		setUpSeparatorTestCase({separator: 'COMMA'});
	},
	testNumpadDecSeparatorShouldBeComma : function() {
		assertCommaPresent(nf$(jqInputId));
	}
});
TestCase("SpaceAsSeparatorTestCase", {
	setUp: function() {
		setUpSeparatorTestCase({separator: ' '});
	},
	testNumpadDecSeparatorShouldBeComma : function() {
		assertSpacePresent(nf$(jqInputId));
	}
});
TestCase("SPACEAsSeparatorTestCase", {
	setUp: function() {
		setUpSeparatorTestCase({separator: 'SPACE'});
	},
	testNumpadDecSeparatorShouldBeComma : function() {
		assertSpacePresent(nf$(jqInputId));
	}
});
TestCase("PredefinedVariablesTestCase", {
	setUp: function() {
		setUpSeparatorTestCase({separator: 'APOSTROPHE', predefinedVariables: {'APOSTROPHE': "'"}});
	},
	testNumpadDecSeparatorShouldBeApostrophe : function() {
		assertEquals("numpad separator should be apostrophe", "'", nf$(jqInputId).val());
	}
});

function setUpSeparatorTestCase(options) {
	var inputId = "element";
	var spanId = "span:id";
	jqInputId = NovelFaces.jqId(inputId);
	/*:DOC += <span><input type="text" /></span> */
	nf$('input:not([id])').attr('id', inputId);
	nf$('span:not([id])').attr('id', spanId);
	new NovelFaces.numpadDecSeparator(spanId, options);
	nf$(jqInputId).focus();
	triggerNumpadDecimalSeperator(nf$(jqInputId));
}
